package com.foreknow.elmboot.service;

import com.foreknow.elmboot.po.Orders;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface OrdersService {
    /**
     *新建订单
     * @param orders
     * @return
     * @throws Exception
     */
    public int createOrders(Orders orders);

    /**
     *根据orderId查询订单
     * @param orderId
     * @return
     */
    public Orders getOrdersById(Integer orderId);

    /**
     *根据userId查询订单
     * @param userId
     * @return
     */
    public List<Orders> listOrdersByUserId(String userId);

    /**
     *更新用户订单状态
     * @param orderId
     * @return
     */
    public int updateorderState(Integer orderId);
}
